home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
programming
/
arexx
/
rxcmanager
/
examples
/
e2ib.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-05-25
|
2KB
|
77 lines
/*
Author: Alfonso Ranieri <alfier@iol.it>
Desription: Export to an IBrowse hotlist
Template: KEY,USER/K
Tipical usage: rx e2ib >file
*/
call addlib("rmh.library",0,-30) then exit
call addlib("rxcmanager.library",0,-30) then exit
if ~open("STDERR","CONSOLE:","W") then stderr="STDOUT"
prg=programname("NOEXT")
if ~RMH_ReadArgs("KEY,USER/K") then do
call printfault(ioerr(),prg)
exit
end
if parm.0.flag then k = "#?"parm.0.value"#?"
else k = "#?"
if parm.1.flag then call CMUserData(parm.1.value)
patt.Name = k
patt.WWW = k
patt.Comment = k
num = CMFind("WWW GROUPS","URL","PATT")
if num=1 then call info "No url entry found"
else call info "Found" num "url(s)"
say '<!-- IBrowse Hotlist V2 -->'
say '<HTML>'
say '<HEAD><TITLE>IBrowse Hotlist</TITLE></HEAD>'
say '<BODY>'
say '<H2><P ALIGN=CENTER>IBrowse Hotlist</P></H2>'
say '<HR>'
say '<UL>'
g=""
p=""
ng=0
do i=0 to num-1
if url.i.Group~=g then do
if g~="" then do
if url.i.Group~=g & url.i.parents="" then do
call endG
end
end
say "<LI><B>"url.i.Group"</B><UL>"
ng=ng+1
g=url.i.Group
end
if ~url.i.EmptyGroup then
say "<LI><A HREF=" || '"'url.i.WWW'"' || ">" || url.i.Name || "</A>"
end
call endG
say '</UL>'
say '<HR>'
say '<P align=center><font size=-1>This hotlist has been created using <A HREF="http://users.iol.it/alfier/rxcmanager.html">rxcmanager</A>.</font></P></BODY>'
say '</HTML>'
exit
info: procedure expose stderr prg
parse arg msg
call writeln(stderr,prg":" msg)
return
endG: procedure expose ng
do j=0 to ng-1
say "</UL>"
end
ng=0
return